package com.mouse.damo.service;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@NoArgsConstructor
@AllArgsConstructor
@Data
public class Point {
    private int state;
    private int x;
    private int y;

    public Point(int[] p) {
        this.state = p[0];
        this.x = p[1];
        this.y = p[2];
    }

    public boolean isSuccess() {
        return state != -1;
    }

    @Override
    public String toString() {
        return "Point{" +
                "state=" + state +
                ", x=" + x +
                ", y=" + y +
                '}';
    }
}
